module.exports = function(sequelize){
    var Sequelize = require('sequelize');
    var Patient = sequelize.define('patient',{
        pName:{
            type:Sequelize.STRING,
            allowNull:false,
        },
        pIdNum:{
            type:Sequelize.STRING,
            allowNull:false,
        },
        pDept:{
            type:Sequelize.STRING,
            allowNull:false,
        },
        pConsultingRoom:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        pCardNum :{
            type:Sequelize.INTEGER,
            primaryKey:true,
            allowNull:false,
            autoIncrement: true
        },
        pSex:{
            type:Sequelize.STRING
        },
        pAge:{
            type:Sequelize.INTEGER
        },
        registerTime:{
            type:Sequelize.STRING
        },
        reportTime:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        triageTime:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        pQueue:{
            type:Sequelize.STRING,
            defaultValue:'首诊列队'
        },
        height:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        weight:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        temperature:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        breath:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        pulse:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        bloodPressure:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        bloodSugar:{
            type:Sequelize.STRING,
            defaultValue:'暂定',
        },
        diseaseDescription:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        },
        ifMedical:{
            type:Sequelize.STRING,
            defaultValue:'暂定'
        }
    },{
        freezeTableName: true,
        timestamps: false
    });
    return Patient;
};